home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
SYS
/
RECURSIVE
/
_files
/
_recursive
/
recursive
< prev
next >
Wrap
Text File
|
1991-04-07
|
1KB
|
51 lines
BEGIN {
char x[ 128 ];
fnx="";
zaehler=0;
system("<rec$dir>.Pathname { > <rec$dir>.output2 }");
system("count * r~v~c { > <rec$dir>.output3 }");
}
/' /
{
if (fnx!=FILENAME)
{
y=1;
fnx=FILENAME
}
if (y==1)
{
x=$1;
y=0;
}
else
x=substr($1,2);
# restore orginal directory and execute commando
if (FILENAME=="<rec$dir>.output2")
{
system("echo { > <rec$dir>.output }");
command=sprintf("%s { >> <rec$dir>.output }",var);
backcd=sprintf("dir %s",x);
}
# jump to directory, execute commando
if (FILENAME=="<rec$dir>.output3")
{
if (x=="Directory")
{
system(backcd);
cd=sprintf("dir %s",$2);
system(cd);
system(command);
}
}
}
END {
system(backcd);
system(command);
system("delete <rec$dir>.output2");
system("delete <rec$dir>.output3");
system("type <rec$dir>.output");
}